<template>
  <el-dialog
    title="通过"
    :visible.sync="dialogVisible"
    width="30%"
    >
    <span>
      <div>输入URL:</div>
      <input type="text" style="width: 100%;height: 30px;margin-top:10px;"
             v-model="url">
    </span>
    <span slot="footer" class="dialog-footer">
      <el-button @click="dialogVisible = false">取 消</el-button>
      <el-button type="primary" @click="doPass">通过并上传</el-button>
    </span>
  </el-dialog>
</template>

<script>
/*eslint-disable*/
import {getDoPass} from "../../utils/productcheck";

export default {
    name: "Pass",
    data() {
      return {
        dialogVisible: false,
        url:"",
        prodCode:""
      }
    },
    methods: {
      showdialog(prodCode) {
        this.prodCode=prodCode;
        this.dialogVisible=true
      },
      doPass(){
        console.log(this.prodCode);
        console.log(this.url);
        getDoPass("/operatingBy",{
          "porcelainCode":this.prodCode,
          "url":this.url
        }).then(rawRes=>rawRes.data).then(res=>{
          console.log("-------->url",res);
          this.$emit("switchPassStatus")
        });
        this.dialogVisible=false
      },
    },
  }
</script>

<style scoped>
.dialog-footer{
  display: flex;align-items: center;justify-content: center;
}
</style>
